<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content">
        <div class="row">
            <div class="col-sm-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">增加分类</h3>
                    </div>
                    <!-- /.box-header -->
                    <form action="{:U('Evaluation/categoryHandle')}" method="post" class="form-horizontal">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="control-label col-sm-2">分类名称</label>
                                <div class="col-sm-4">
                                    <input type="text" placeholder="名称" class="form-control" style="width:500px" name="cat_name" value="{$cat_info.cat_name}">
                                </div>
                                <div class="col-sm-4">&nbsp;</div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">上级分类</label>
                                <div class="col-sm-8">
                                    <select class="small form-control" style="width:200px" tabindex="1" name="parent_id">
                                        <option value="0">顶级分类</option>
                                        {$cat_select}
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">显示排序</label>
                                <div class="col-sm-8">
                                    <input type="text" placeholder="50" class="form-control" style="width:200px" name="sort_order" value="{$cat_info.sort_order}">
                                    <span class="help-inline"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">扣除金额</label>
                                <div class="col-sm-8">
                                    <input type="number" placeholder="0" class="form-control" style="width:100px"
                                           name="deduct_money" value="{$cat_info['deduct_money']?$cat_info['deduct_money']:0}">
                                    <span class="help-inline"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">选项类型</label>
                                <div class="col-sm-8">
                                    <div class="col-sm-2">
                                        <label><input type="radio" name="type" value="1"
                                            <if condition="$cat_info[is_can] eq 1"> checked="checked"</if>> 单选 </label>
                                    </div>
                                    <div class="col-sm-3">
                                        <label><input type="radio" name="type" value="2"
                                            <if condition="$cat_info[is_can] eq 2"> checked="checked"</if>> 多选</label>
                                    </div>
                                    <div class="col-sm-3">
                                        <label><input type="radio" name="type" value="3"
                                            <if condition="$cat_info[is_can] eq 3"> checked="checked"</if>> 多选可不选</label>
                                    </div>
                                    <div class="col-sm-3">
                                        <label><input type="radio" name="type" value="4"
                                            <if condition="$cat_info[is_can] eq 4"> checked="checked"</if>> 单选可不选</label>
                                    </div>
                                    <span class="help-inline"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">是否可选</label>
                                <div class="col-sm-8">
                                        <div class="col-sm-2">
                                            <label><input type="radio" name="is_can" value="1"
                                                <if condition="$cat_info[is_can] eq 1"> checked="checked"</if>> 可选 </label>
                                        </div>
                                        <div class="col-sm-3">
                                            <label><input type="radio" name="is_can" value="2"
                                                <if condition="$cat_info[is_can] eq 2"> checked="checked"</if>> 不可选</label>
                                        </div>
                                    <span class="help-inline"></span>
                                </div>
                            </div>
                        </div>
                        <div class="box-footer">
                            <input type="hidden" name="act" value="{$act}">
                            <input type="hidden" name="cat_id" value="{$cat_info.cat_id}">
                            <input type="hidden" name="category_id" value="{$category_id}">
                            <button type="reset" class="btn btn-primary"><i class="icon-ok"></i>重填</button>
                            <button type="submit" class="btn btn-primary pull-right"><i class="icon-ok"></i>提交</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
</div>
</body>
</html>
